import { mergeConfig } from 'vite';
import { resolve } from 'path';
import getDevConfig from './vite.config.dev';

export default mergeConfig(
  {
    build: {
      cssCodeSplit: true,
      emptyOutDir: true,
      sourcemap: false,
      assetsDir: 'assets', // 默认 assets
      outDir: `dist/mc/`, // 输出到dist
      rollupOptions: {
        input: resolve(__dirname, 'index.html'),
        output: {
          compact: true,
          entryFileNames: 'assets/js/[name]-[hash].js',
          chunkFileNames: 'assets/js/[name]-[hash].js',
          assetFileNames: 'assets/[ext]/[name].[ext]',
        },
      },
    },
  },
  getDevConfig('@arco-themes/vue-zr-med-steward')
);
